package sgfRead;

public class SgfPosition {
	//
	public static final int _BLACK = 0;
	public static final int _WHITE = 1;
	char a;
	char b;
	int type;

	public SgfPosition(String ab) {
		if (ab.isEmpty()) {
			a = '-';
			b = '-';
		} else {
			a = ab.charAt(0);
			b = ab.charAt(1);
		}
	}

	public boolean isBlack() {
		return (type == _BLACK);
	}

	public boolean isWhite() {
		return (type == _WHITE);
	}

	public void setBlack() {
		this.type = _BLACK;

	}

	public void setWhite() {
		this.type = _WHITE;

	}

	public char getA() {
		return a;
	}

	public char getB() {
		return b;
	}

	public boolean isPass() {
		if (a == '-' || b == '-')
			return true;
		else
			return false;
	}

}
